Welcome to WinMorph

Ever wondered at those cool and hi-tech special effects in movies? Have you heard of the term Morphing? Wanted to do those special effects at home or work? Then WinMorph is the tool you always wanted to have.

WinMorph brings the convenience of Windows to the world of Morphing. And it’s extremely fast! Gone are the days when you have to wait for hours together to create a single morphing movie.

WinMorph features include:

  • Easy and intuitive user interface to create morphs.
  • Highly optimized morphing core to take lesser time.
  • A very useful Preview feature to create preview morphs on the fly.
  • Create separate morphs and later combine them into a single movie with sophisticated composing tools.
  • Sophisticated composing tools are available to create morphs that can be Transparent or Moving or Zooming in size. The user has full control over each and every frame of the output movie.
  • Ability to create a single movie by combining morphs, individual bitmaps or complete AVI videos together with special effects.

WinMorph is a Freeware. You can use it for any of your personal or official needs. You may also redistribute WinMorph along with your application or package, free of cost. You may not charge a fee for redistributing WinMorph. However, before redistributing WinMorph, you are expected to inform the author about the redistribution.

Many thanks to all the people who have helped make WinMorph what it is, by making suggestions, helping tests, reporting bugs etc.

Have a look at the full help topics to know more about using WinMorph.


What’s new in version 2.01?

What is new in version 2.01?
  1. The concept of ‘control lines’ has been changed into ‘control shapes’! You now specify the correspondence between the two images by drawing group of lines called ‘control shapes’, and you can manipulate the shapes a whole lot easier.
  2. The User Interface for drawing the control shapes (control lines in WinMorph v1.3 and earlier) has been changed completely. Take a look at the topic Getting familiar with the WinMorph User Interface.
  3. Full undo is available for all shape operations including deletion.
  4. Copy control shapes between morphs or between a morph and a warp, using the Edit>Copy control shapes option.
  5. Swap the source and the target images in any morph, using the Morph>Swap images option.
  6. Minor User Interface changes and bug fixes for reported problems.

The main addition to version 2.01 is the Morph Composer. Using the Composer, you can create a single movie composition by combining any of the following components...

  1. Individual morph sequences created by WinMorph itself.
  2. Individual bitmaps.
  3. Video clips (in AVI format).

Each of these components can be given special effects like motion tracks, transparency etc. Take a look at the topic Working with the Morph Composer.

Related Topics


Support and Questions

To check whether you have the most recent version of WinMorph, please check the WinMorph homepage at http://www.crosswinds.net/~sskr/winmorph.

To report problems and bugs, please drop an email to satishkumr@mailcity.com with the following information.

When reporting problems, please include the following information:

  1. Is the problem reproducible? If so, how?
  2. What version of Windows are you running? For example, Windows 95, Windows NT 4.0, etc.
  3. What version of WinMorph are you running? Select Help>About WinMorph to find the version of WinMorph you are using.
  4. If a dialog box with an error message was displayed please include the full text of the dialog box, including the text in the title bar.


Licensing...

FREEWARE LICENSE AGREEMENT

WinMorph version 2.01
Copyright (c) 1999-2004 Satish Kumar.S

  1. This License applies to version 2.01 of WinMorph (the "Program") distributed by Satish Kumar.S (the "Author"). This License also applies to any source, utility or other code, and any additional resources or materials, included with the Program.
  2. All copyrights to the Program are exclusively owned by the Author. All rights not expressly granted here are reserved by the Author.
  3. The Program may be used for any personal, business or other requirements, and may be re-distributed but you may not charge any fee for re-distributing it.
  4. No warranty of any kind is expressed or implied. You use the Program at your own risk. The Author will not be liable for data loss, damages, loss of profits or any other kind of loss while using or misusing the Program.
  5. You may not emulate, clone, rent, lease, sell, decompile, disassemble, otherwise reverse engineer the Program, or any subset of the Program. Any such unauthorized use shall result in immediate and automatic termination of this License and may result in criminal and/or civil prosecution.
  6. The Author reserved the right to make exceptions to any of these conditions, or to alter these conditions, at any time.
  7. Installing and using the Program signifies acceptance of these terms and conditions of the License. If you do not agree with the terms of this License you must remove Program files from your storage devices and cease to use the Program.

Please have a look at the Help>About>Copyright dialog for copyright related issues.


About me...

This application, WinMorph v2.01, was completely written by me, Satish Kumar.S (some code related to JPEG/MPEG file read/write have been taken from elsewhere. Please see the Help>About>Copyright dialog for more info.). It began as a study project when i was learning the C language and the earlier versions were written on DOS using TurboC. And i ported it to Windows when i was learning Win32 programming using Visual C++ (and of course, WinMorph is now written completely using Visual C++).

WinMorph v2.01 is a showcase of the kind of programming i do and like to do. I am very much interested in anything related to graphics programming, and have very good experiencing in optimizing code for many computationally intensive applications (one such app is WinMorph itself!).

If you feel i can help you with some of the knowledge and experience i have gained till now, please feel free to drop me an email at the netaddress satishkumr@mailcity.com. I will be glad to share whatever i have learnt. Also, if you find that some parts of WinMorph or some algorithms used in WinMorph can be put to good use in any of your applications, you can write to me at the same address and i may be interested in developing them for you.

Have a nice day Win-Morphing...


Basics of Warping and Morphing

What is warping?

The process of distorting/modifying an image using a set of reference points or lines is called warping. The reference points/lines are called Control Points or Control lines.

Initially, you specify the reference points/lines in the original image visually. Then you specify the new position of the control points/lines and the image will be warped according to the correspondence between the source and target control points/lines.

In WinMorph, you use a set of lines called control shapes to specify this reference.

What is morphing?

Morphing is the process of transforming one image into another smoothly. The user specifies the correspondence between the two images using a set of control lines/points, which are used for mapping pixels in the source image to the target image.

The underlying principle of morphing is to warp and dissolve. The source image is warped to the target image, and the target image is warped to the source image, and both these intermediate images are dissolved pixel-by-pixel to give that smooth transition from the source to target.


Warping with WinMorph

The basic steps involved in warping using WinMorph are:

  1. Choose the File>New>Warp option to create a new warp, and select the image file you want to warp. Or you can also choose File>Open and choose the image file you want to warp.
  2. Select the Tool>Pen tool.
  3. Draw the initial set of control shapes on the image.
  4. Check the Warp>Warp option. Now, you cannot add or delete any control shapes, but can only modify the existing control shapes. Choose either the Edit Shape or the Resize tool from the Tool menu. Each time you change a control shape, the image will be warped accordingly.
  5. To add new control shapes or delete existing ones, uncheck the Warp>Warp option.


Building your first Morph project.

The basic steps involved in morphing using WinMorph are:

  1. Choose the File>New>Morph project option to create a new morphing project. Choose two images as the source and target images.
  2. Specify the correspondence between the two images using a set of shapes called Control shapes. A shape in the source image will map to a corresponding shape in the target image. While morphing, pixels adjacent to a control shape in the source image will be pulled such that they also appear adjacent to the corresponding control shape in the target image.
    To add new control shapes, choose the Pen tool from the Tools menu, and then draw.
  3. Choose Morph>Options option to specify the morph options such as output filename, number of frames and duration of the movie.
  4. Choose Morph>Morph option to do the actual morphing.
  5. If you want to swap the source and target images, choose Morph>Swap images option.
  6. To delete all control shapes and start from the beginning, choose Morph>Clear control shapes option.

The Morph Options dialog


Getting familiar with the WinMorph user interface.

To do morphing or warping, you need to draw a set of control shapes on each image you use. These control shapes are grouped into shapes as and when you draw. This section describes how to draw the control shapes in WinMorph.

Drawing new control shapes

To draw new control shapes, choose the Pen tool from the Tools menu.

New shape creation follows the click-move-click routine. If you are drawing a new control shape, left-click at the starting position, release the mouse button, move the mouse pointer to the end position and left-click once again. Please note that there are no click-drag-release operations.

Once you draw a new control line for a shape, another line will be automatically drawn from the end of the new line. To cancel a new line being drawn, click the right mouse button. This marks the end of the shape, and all lines that you have drawn continuously will be grouped together into a single shape that can be manipulated as a single element.

Modifying existing control shapes

To modify existing control shapes, choose the Edit Shape tool or the Resize tool from the Tools menu.

Select an existing shape by clicking on any part of the shape and it will be highlighted. To delete it, just press the Del key or choose Edit>Delete option.

To modify an existing shape, first select the shape and then click-and-drag the point that you want to modify.

Note that all the control shape/shape operations done in WinMorph can be completely Undo-ed.


Tools menu

Pen

Use this tool to draw new control shapes. You first left-click on the starting point, release the mouse button, move to another point, and click once again to draw a line. Once you finish drawing a line, another line will begin from the end of the previous line. Keep drawing till you finish drawing the outline of the entire shape, and then right-click the mouse to end the drawing.

Edit Shape

Use this tool to modify the control points of an existing shape. Choose this tool and click on the shape you want to modify. All the control points that make up the shape will now be shown. Click on the point that you want to modify, drag it to the new position, and release the mouse button.

Resize

Use this tool to move/resize a shape. Choose this tool and click on the shape you want to move/resize. A box around the shape will be displayed, with key points on the edges. As you move/resize this bounding box, the shape will be moved/resized.


When to use the Preview option?

The Preview feature is a shortcut in doing the morphing. After you have drawn all the control shapes in the two images, you are ready to do the morphing. At that time, you can choose to do a full morph, or just a preview.

If you do a full morph (by choosing the menu option Morph>Morph), WinMorph computes each and every frame of the output movie independently and produces an accurate morphing movie. However, this takes lots of calculations, so it is a bit slow.

However, if you do a preview morph (by choosing the menu option Morph>Preview), WinMorph follows a different algorithm with very minimal calculations and creates the frames using these results. This is very fast, but the resulting morph movie may not be the accurate output.

To decide which way to proceed, have a look at the source and target images you are using. If there is a lot of similarity between them (for example: two human faces), then you can safely use the Preview option, and the output will be very much identical to the one produced by the full morph option. However, if the two images differ considerably, the output of the Preview may not be up to the mark, so you have to use only the full morph option.

When you are using the Morph Composer to combine many separate morphing sequences, and if you are using the Transparent colour option in any of the morphs, it is advised not to use the Preview option


Tips and tricks
Have a thorough look at the sample projects that come along with WinMorph. They use almost all the available features, so you’ll get to know all the available features and tricks.
You can rotate an image by warping! Just open the image and draw a control shape from the center of the image to the center of the right edge. Now check the Warp option in the Warp menu, and move the right end of the line to the center of the bottom edge. And lo! the image is rotated by 90. Similarly, you can also resize the image.
By default, WinMorph tries to preserve the edge colors of the image. For example, when rotating an image like the situation told above, the blank pixels created after rotating the image are filled in with the corresponding pixels from the four edges of the image. In some cases it would look good, and sometimes you might not want it to happen. In such situations, use an image editor to draw a single black line in the 4 corners of the image, and then do the warping.
Try to use as less control shapes/lines as possible, because the number of control shapes/lines is directly proportional to the time taken to warp or morph the image.
It is a good idea to first draw a control shape covering the four edges of the image, and then start warping or morphing. This way, the effect of the other control shapes will be controlled and constrained within a shorter region and you’ll have better control.
If you have trouble in seeing the control shapes in contrast with the actual image, try changing the colour of the control shapes, using the Colour Picker (the color band on the top toolbar). A left mouse button click on a colour selects the colour of a normal shape, and a right button click on a colour selects the colour of a highlighted shape (the currently selected shape).


Working with the Morph Composer

The Morph Composer is a video editor using which you can compose a single movie out of many separate elements. A composition created using the MorphComposer can include any of the following elements.

  1. Morph projects created by WinMorph itself.
  2. Individual images.
  3. Individual AVI (video) files.

The steps to follow to create a new composition are

  1. Create all the morph projects required and also gather the images and AVI files.
  2. Choose File>New>Composer project to create a new composer project.
  3. Add the elements one by one, by choosing Compose>Add.
  4. Modify the properties of the individual elements (see below for details).
  5. Choose Compose>Options to specify the output file name/type and the output movie parameters.
  6. Choose Compose>Morph or Compose>Preview to create the morph movie.

Let us take that the movie you want to create must have 50 frames totally, and is 320 x 240 pixels in size (you specify these in the Compose>Options dialog). You can use any number of elements to create this movie using the Composer. First, gather the elements (images, AVI files and Morph projects required), then create a new Composer project and add all the elements into the new composer project.

A sample screenshot of a Composer Window

For each morph added, a horizontal ‘bar’ is displayed in the Composer, with the name of the morph project on the left of the ‘bar’. To select a morph sequence, just click on the corresponding ‘bar’. Each morph sequence in the Composer has the following properties:

  1. The starting and ending frames.
  2. The position (x & y) of the morph in the output movie.
  3. The transparent colour.
  4. The transparency percentage value.
  5. Other miscellaneous properties.

To learn more about these properties, take a look at the topic Properties of an element in the Composer.


Properties of an element in the Composer

For each morph added, a horizontal ‘bar’ is displayed in the Composer as shown here. To choose a morph, click on the ‘bar’.

A sample screenshot of a Composer Window

The properties of an element in the Composer are:

The starting and ending frames:

These are the frames in the output movie within which this morphing sequence will be visible. You can directly change them by altering the start & length of the ‘bar’ for this morph in the composer (but beware! you can only reposition the 'bar' but not change its length, if the element is an AVI movie).

The position (x & y) of the morph in the output movie:

You can actually specify a curve along which the morph will be moving in the output movie. The Motion editor is the tool used to specify this, and it can be invoked by choosing the Compose>Motion editor option.

The transparent colour:

If you are having a sequence like a moving ball, you might want only the ball to be visible and the other background to be transparent. To do this, you have to choose the colour of the background and everything except this colour will be included in the output movie. To specify this transparent colour, choose Compose>Transparent colour option. For more details, take a look at the topic Choosing the transparent colour.

The transparency percentage value:

This value is a percentage, which is used to add up all the individual morph sequences into the output movie. If transparency=100%, the morph will appear normal, and if transparency=50%, you can get a ‘glassy’ morph with part of the background also visible through it. The transparency value is specified as a curve, and the tool to specify this curve is the Transparency editor. It can be invoked by choosing the Compose>Transparency option.

Other miscellaneous properties:

These can be set by choosing Compose>Properties option.

  1. Symmetric frames: The morph sequence will start from first image and transform to second image, and back to the first image.
  2. Auto-Repeat: The morph sequence will repeat itself again and again in the output movie.
  3. Reverse Morph: The sequence will appear in reverse order in the output movie.

The most important property of a morph sequence in the Composer, is its position in the morph list (refer the above figure). You need to order the morphs in the Composer list very carefully. WinMorph creates the output movie by adding the morphs one by one, first to the last. If the first morph in the list is as big as the output movie size, and if it’s transparency value is 100, then the other morphs will not be visible at all! The privileges and properties of each morph sequence are given in the order they are present in the list.

So if you have a background morph, which must be present for the entire output movie, put it last in the list and put the other morphs above it in the list.

You can change the position of a morph in the Composer list by using the menu options Compose>Move Up & Compose>Move Down.


Options dialog

The options available for morphing and for the composer are:

Save as file

Specify the name of the output file.

... Of type

Choose the type of output movie. Available options are

  1. AVI file
  2. MPEG file
  3. Individual Frames as BMP files.

Number of frames

The number of frames to be present in the output movie.

Duration of the movie

The length of the movie, in seconds. Please note that for an MPEG output, if the Number of frames value is less than 24, the duration of the movie will always be less than 1 second.

Movie width & Movie height

The width & height of the output movie in pixels.

Symmetrical frames

Check this option if you want the morphing to transform from the first image to the second image, and back to the first image (two-way morph). If you don’t check this option, the morph will be one-way.

Output Resolution

Select the resolution of the video output you want to create. The normal resolution of a morph project is the size of the input images, and for a Composer project it is the dimensions specified by the fields 'Movie width' and 'Movie height' in the options dialog. If you are using very big images (say, greater than 640 x 480 pixels in size), you might not want to render the entire morph or composition each time you make a small change. In such situations, while building a morph or composition, you can set the output resolution to a small value (say 1/3rd of the actual size, or 1/5th of the actual size), and you can use it to get a good preview of the actual morph.

Morphing with WinMorph


Motion editor

The Motion editor allows you to specify the path in which a morph sequence will be moving in the output movie. For example, you might be having a morph of a car that must be moving in the output movie. You can use the Motion editor to specify the path that the car will take.

A sample screenshot of the Motion editor (initial)

When you add a morph to the Composer, and open the Motion editor, you’ll see only 1 point as shown above. It is one of the Control Points. Actually, you can specify the motion path as a straight line or as a spline curve. For both options, the Motion editor will give you a set of Control Points that you can use to specify the path. A straight-line path will have 2 Control Points, and a spline path will have 6 Control Points.

Since by default the morph sequence is shown at the top left corner of the output movie, all the Control Points are placed at the top left corner (x=0, y=0). If you drag the control point that is visible, you’ll see the other control points behind it.

A sample screenshot of the Motion editor (after editing)

The small green-coloured diamond shaped points show the position of the morph frames along the path of the curve.


Transparency editor

The Transparency editor is used to specify the transparency curve of a morph sequence. For each frame of a morph sequence, the transparency percentage value will be taken from the transparency curve.

A sample screenshot of Transparency editor

The two blue points shown in the figure above are the Start and End Percentages, which you can change. The transparency value for each frame of the morph sequence will follow the curve that you draw.

For a good example of how to use Transparency to get good effects, have a look at the sample Composer project mrfdemo.med which is distributed along with WinMorph.


Choosing the Transparent colour

You can choose the transparent colour by choosing the menu option Compose>Transparent colour, and choose the colour from the images shown.

Why should we use transparent colour? For example, if you have a morph with the image of a ball against white background, and you want only the ball to be visible in the Composer output movie, you can specify the white colour as the transparent colour.

The ball image with white background
Without transparent colour (fig.1) & with white as transparent colour (fig.2)

For a good example of how to use Transparency to get good effects, have a look at the sample Composer project mrfdemo.med which is distributed along with WinMorph.

Smooth edges for transparent frames

Choosing this option will do antialiasing along the edges of the image, so that the edges present in the frames of the morph sequence will be smooth. If you are using the transparent colour option, you probably get ‘jagged’ edges in the output movie and to smooth-en these edges you can use this option. There is no specific example for this option, it has to be learnt by experience when to use and when not to use it.